home *** CD-ROM | disk | FTP | other *** search
-
-
-
- IOCTL C Library Procedures IOCTL
-
-
-
- NNAAMMEE
- ioctl - control device
-
- SSYYNNOOPPSSIISS
- ##iinncclluuddee <<ssyyss//iiooccttll..hh>>
-
- iiooccttll((dd,, rreeqquueesstt,, aarrggpp))
- iinntt dd;;
- uunnssiiggnneedd lloonngg rreeqquueesstt;;
- cchhaarr **aarrggpp;;
-
- DDEESSCCRRIIPPTTIIOONN
- _I_o_c_t_l performs a variety of functions on open descriptors.
- In particular, many operating characteristics of character
- special files (e.g. terminals) may be controlled with _i_o_c_t_l
- requests. The writeups of various devices in section 4 dis-
- cuss how _i_o_c_t_l applies to them.
-
- An ioctl _r_e_q_u_e_s_t has encoded in it whether the argument is
- an "in" parameter or "out" parameter, and the size of the
- argument _a_r_g_p in bytes. Macros and defines used in specify-
- ing an ioctl _r_e_q_u_e_s_t are located in the file <_s_y_s/_i_o_c_t_l._h>.
-
- RREETTUURRNN VVAALLUUEE
- If an error has occurred, a value of -1 is returned and
- _e_r_r_n_o is set to indicate the error.
-
- EERRRROORRSS
- _I_o_c_t_l will fail if one or more of the following are true:
-
- [EBADF] _D is not a valid descriptor.
-
- [ENOTTY] _D is not associated with a character special
- device.
-
- [ENOTTY] The specified request does not apply to the
- kind of object that the descriptor _d refer-
- ences.
-
- [EINVAL] _R_e_q_u_e_s_t or _a_r_g_p is not valid.
-
- SSEEEE AALLSSOO
- execve(2), fcntl(2), mt(4), tty(4), intro(4N)
-
-
-
-
-
-
-
-
-
-
-
-
- Sprite v1.0 March 4, 1986 1
-
-
-
-